1. Field
The disclosure relates generally to an improved data processing system and, in particular, to processing code. Still more particularly, the present disclosure relates to a method and apparatus for evaluating code in software testing.
2. Description of the Related Art
In testing software, one test used is a code coverage test. The code coverage test generates a result that describes the degree to which the source code has been tested. With this type of testing, the application is run using a test suite. A test suite is a collection of test cases that are to be used to test a software program. Each test case is used to show that the particular application has some specified number of behaviors or results.
When running these test cases, the results are collected. The results are referred to the code as code coverage. The criteria in code coverage may include whether a function has been called, whether each node has been run, whether each branch or decision has been met or not met, whether each condition has been evaluated to both true and false, and/or other suitable types of criteria.
Typically, the code for the application is instrumented to collect data about the running of the code in response to using the test suite. It is desirable to run the application in a manner that every function, statement, and other suitable constructs in the application are run during testing. This process allows developers and programmers to look for parts of an application that are rarely or never accessed under normal operating conditions. The code coverage provides a result that may be analyzed to identify what areas of the code have not been run.